package com.zx.ymy.net.api

import com.zx.yixun.data.*
import com.zx.ymy.base.BaseResponse
import io.reactivex.Observable
import retrofit2.http.*


//地址
interface MyApi {

    //密码登录
    @FormUrlEncoded
    @POST("ashton/app/login")
    fun passwordLogin(@Field("username") username:String,
                      @Field("password") password:String): Observable<BaseResponse<UserBean>>

    //产品-列表
    @POST("ashton/pad/getProducts")
    @Headers("Content-Type:application/json")
    fun getProducts(@Body RequestBody:GetPruductBean): Observable<BaseResponse<ProductModel>>

    //人工屏-产品-工序步骤 - 绑定
    @POST("ashton/pad/addPadProduct")
    @Headers("Content-Type:application/json")
    fun addPadProduct(@Body RequestBody:AddPruductBean): Observable<BaseResponse<ProductModel>>

    //线头屏 - 产线黑盒子列表
    @POST("ashton/pad/getLine")
    @Headers("Content-Type:application/json")
    fun getLineData(@Body RequestBody:GetLineBean): Observable<BaseResponse<List<LineDatabean>>>
}